import {request} from "../util/axioscontainer.js";

export const getProducts = async (params) => {
    return await request({
        url: '/products',
        method: 'get',
        params: params
    });
}
// /purchase/consumption
export const getConsumption = async (params) => {
    return await request({
        url: '/purchase/consumption',
        method: 'post',
        data: params
    });
}

// /userPoints/getUserPoints
export const getUserPoints = async (params) => {
    return await request({
        url: '/userPoints/getUserPoints',
        method: 'get',
        params: params
    });

}
//food
export const getFood =async (params) => {
    return await request({
        url: '/food',
        method: 'get',
        params: params
    });
}

// /checkout
export const sendCheckout = async (params) => {
    return await request({
        url: '/checkout',
        method: 'post',
        data: params
    });
}
